Digital Wanderer

We live as long as we fly

Article - The Current Situation with Video Compression, Part 2

Link to the first part

Reality and practice

And so, happiness has finally arrived. Starting from  a certain version, Flash began to support H.264, and even with highly compressed AAC-HE audio. Microsoft got scared, and announced that future versions of Silverlight would support H.264 too.

Thus, some parity was established between the elephant and the whale, and for website owners, paradise has come. Almost. If you don't count the fact that H.264 in Flash lags god-awfully at resolutions above the standard 640x480. Silverlight with its VC-1 runs two to three times faster, but it is still installed on only about 30 percent of all internet-connected computers.

So what options are there then for hosting video on sites?

1. Use Silverlight and Microsoft Expression Studio to encode in VC-1. It is paid, true, but they give it out for free to students with an ISIC through the DreamSpark program, just like many other development tools from Microsoft.

2. Use Flash, for example the popular JW FLV Player, and encode to H.264 using some program, which are a dime a dozen nowadays. Apple's paid QuickTime is not bad, but it doesn't understand MPEG on input, at least I couldn't find a way to do it on Windows. On the bright side, it's easy and convenient to use. They say Nero Recode also encodes well to h.264, but all my attempts to use it ended in failure: it either glitches, or won't let me select the needed parameters.

In the end, I settled on a very decent program called Xvid4PSP by a Russian developer with the nickname Winnydows. The program is free because it is simply a shell for a set of open-source projects like ffmpeg and h.264. By the way, I tried using ffmpeg directly from the command line on Linux, but I still couldn't manage to produce a video encoded in h.264. It's not for nothing that the ffmpeg developers write on their official site that the program isn't meant for direct use, but rather for inclusion in other packages, much like it's done in XviD4PSP.

In any case, the good news is that the resulting h.264 in an MP4 container can be played by Flash, QuickTime, and even on all sorts of iPhones and Nokia 5800s. Naturally, it also plays effortlessly on a computer using any player, provided an H.264 decoder is installed.

3. Use a third-party video hosting service, like YouTube, which recently started supporting h.264, dubbing it “high quality”. Or Vimeo – the codec there is a bit worse, VP6, but it also looks alright, and h.264 support isn't far off.

The future and high definition

So on the whole, things with video on the web aren't bad, though still not ideal. But on the high-definition disc front, everything is fine: Blu-ray quality in full FullHD resolution (1920x1280) is incredibly pleasing. On the other hand, the required processor power is saddening: you usually need at least a dual-core Intel Core 2 Duo, and even that isn't always enough. For it to be enough, you should install the CoreAVC filter, which contains the fastest  H.264 decoder in existence. And if you have a video card with hardware video decoding support, like the ATI HD2600 – it makes sense to install the PowerDVD player, which includes a codec that supports  this feature.

The free ffdshow codec, on the other hand, lags god-awfully on FullHD H.264, just like the codecs of all other companies.

In principle, the fairy tale could end here, but there is an important thing worth mentioning. All the aforementioned codecs contain patented algorithms. This already sounds idiotic, and in practice, it's even worse – the codecs are either paid, or free but not entirely legal. Luckily, not all countries recognize patents on algorithms, and the owners prefer not to go after free codecs – little benefit, lots of money wasted. In any case, all these codecs (originating from the MPEG consortium) use the same basic algorithm -  block-oriented motion-compensation-based, I won't translate or explain this in detail.

But the possibility of using wavelets for video compression has been researched for quite a while.  In the end, their research bore fruit – the British state channel BBC, famous for many things, created a wavelet-based codec called Dirac . Aside from pleasant features like being free and open-source, Dirac is also patent-free and highly efficient.

The downsides – hardly anyone knows about it, there's almost no software support, and it hogs the processor even worse than H.264. But these are fixable issues, so in theory, the future belongs to Dirac, even if not the near future. That is, unless they invent something even more advanced. In any case, the MPEG family isn't going anywhere, because it has extremely broad support in broadcasting standards and devices, and besides, H.264 is good.